import request from '@/utils/request';
export type AnyObject = {
  [propsName: string]: any
}
export type ContainIdObject = {
  id: string,
  [propsName: string]: any
}
export interface HotSearchModel{
  defaultKeyword: AnyObject[],
  defaultKeywords: AnyObject[],
  hotKeywordVOList: AnyObject[],
  colorfulEggList: AnyObject[]
}
export interface DataModel{
  data: HotSearchModel | string[]
}
export const getHotSearch = () => {
  return request.get<any, DataModel>('xhr/search/init.json')
} 
export const getclickHotSearch = (keywordPrefix:string) => {
  return request.get<any, DataModel>(`xhr/search/searchAutoComplete.json?keywordPrefix=${keywordPrefix}`)
} 